<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>The ultimate Vim configuration - vimrc</title>
<meta name="Generator" content="Vim/7.3">
<meta name="plugin-version" content="vim7.3_v6">
<meta name="syntax" content="vim">
<meta name="settings" content="use_css">
<style type="text/css">
<!--
pre { font-family: monospace; color: #d0d0d0; background-color: #202020; }
body { font-family: monospace; color: #d0d0d0; background-color: #202020; }
.Number { color: #e0c060; }
.LineNr { color: #b0b0b0; }
.Identifier { color: #f0c0f0; }
.Normal { color: #d0d0d0; background-color: #202020; }
.Special { color: #e0c060; }
.Constant { color: #80c0e0; }
.Type { color: #b0d0f0; }
.Statement { color: #c0d8f8; }
.PreProc { color: #60f080; }
.Comment { color: #d0d090; }
-->
</style>
</head>
<body>
<pre>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">Maintainer:</span><span class="Comment"> amix the lucky stiff</span>
<span class="Comment">&quot;             <a href="http://amix.dk">http://amix.dk</a> - amix@amix.dk</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">Version:</span><span class="Comment"> 3.6 - 25/08/10 14:40:30</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">Blog_post:</span><span class="Comment"> </span>
<span class="Comment">&quot;       <a href="http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc">http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc</a></span>
<span class="Comment">&quot;</span> <span class="PreProc">Syntax_highlighted:</span>
<span class="Comment">&quot;       <a href="http://amix.dk/vim/vimrc.html">http://amix.dk/vim/vimrc.html</a></span>
<span class="Comment">&quot;</span> <span class="PreProc">Raw_version:</span><span class="Comment"> </span>
<span class="Comment">&quot;       <a href="http://amix.dk/vim/vimrc.txt">http://amix.dk/vim/vimrc.txt</a></span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">How_to_Install_on_Unix:</span>
<span class="Comment">&quot;    $ mkdir ~/.vim_runtime</span>
<span class="Comment">&quot;    $ svn co svn://orangoo.com/vim ~/.vim_runtime</span>
<span class="Comment">&quot;    $ cat ~/.vim_runtime/install.sh</span>
<span class="Comment">&quot;    $ sh ~/.vim_runtime/install.sh &lt;system&gt;</span>
<span class="Comment">&quot;      &lt;sytem&gt; can be `mac`, `linux` or `windows`</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">How_to_Upgrade:</span>
<span class="Comment">&quot;    $ svn update ~/.vim_runtime</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">Sections:</span>
<span class="Comment">&quot;    -&gt; General</span>
<span class="Comment">&quot;    -&gt; VIM user interface</span>
<span class="Comment">&quot;    -&gt; Colors and Fonts</span>
<span class="Comment">&quot;    -&gt; Files and backups</span>
<span class="Comment">&quot;    -&gt; Text, tab and indent related</span>
<span class="Comment">&quot;    -&gt; Visual mode related</span>
<span class="Comment">&quot;    -&gt; Command mode related</span>
<span class="Comment">&quot;    -&gt; Moving around, tabs and buffers</span>
<span class="Comment">&quot;    -&gt; Statusline</span>
<span class="Comment">&quot;    -&gt; Parenthesis/bracket expanding</span>
<span class="Comment">&quot;    -&gt; General Abbrevs</span>
<span class="Comment">&quot;    -&gt; Editing mappings</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;    -&gt; Cope</span>
<span class="Comment">&quot;    -&gt; Minibuffer plugin</span>
<span class="Comment">&quot;    -&gt; Omni complete functions</span>
<span class="Comment">&quot;    -&gt; Python section</span>
<span class="Comment">&quot;    -&gt; JavaScript section</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span> <span class="PreProc">Plugins_Included:</span>
<span class="Comment">&quot;     &gt; minibufexpl.vim - <a href="http://www.vim.org/scripts/script.php?script_id=159">http://www.vim.org/scripts/script.php?script_id=159</a></span>
<span class="Comment">&quot;       Makes it easy to get an overview of buffers:</span>
<span class="Comment">&quot;           info -&gt; :e ~/.vim_runtime/plugin/minibufexpl.vim</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;     &gt; bufexplorer - <a href="http://www.vim.org/scripts/script.php?script_id=42">http://www.vim.org/scripts/script.php?script_id=42</a></span>
<span class="Comment">&quot;       Makes it easy to switch between buffers:</span>
<span class="Comment">&quot;           info -&gt; :help bufExplorer</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;     &gt; yankring.vim - <a href="http://www.vim.org/scripts/script.php?script_id=1234">http://www.vim.org/scripts/script.php?script_id=1234</a></span>
<span class="Comment">&quot;       Emacs's killring, useful when using the clipboard:</span>
<span class="Comment">&quot;           info -&gt; :help yankring</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;     &gt; surround.vim - <a href="http://www.vim.org/scripts/script.php?script_id=1697">http://www.vim.org/scripts/script.php?script_id=1697</a></span>
<span class="Comment">&quot;       Makes it easy to work with surrounding text:</span>
<span class="Comment">&quot;           info -&gt; :help surround</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;     &gt; snipMate.vim - <a href="http://www.vim.org/scripts/script.php?script_id=2540">http://www.vim.org/scripts/script.php?script_id=2540</a></span>
<span class="Comment">&quot;       Snippets for many languages (similar to TextMate's):</span>
<span class="Comment">&quot;           info -&gt; :help snipMate</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;     &gt; mru.vim - <a href="http://www.vim.org/scripts/script.php?script_id=521">http://www.vim.org/scripts/script.php?script_id=521</a></span>
<span class="Comment">&quot;       Plugin to manage Most Recently Used (MRU) files:</span>
<span class="Comment">&quot;           info -&gt; :e ~/.vim_runtime/plugin/mru.vim</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;     &gt; Command-T - <a href="http://www.vim.org/scripts/script.php?script_id=3025">http://www.vim.org/scripts/script.php?script_id=3025</a></span>
<span class="Comment">&quot;       Command-T plug-in provides an extremely fast, intuitive mechanism for opening filesa:</span>
<span class="Comment">&quot;           info -&gt; :help CommandT</span>
<span class="Comment">&quot;           screencast and web-help -&gt; <a href="http://amix.dk/blog/post/19501">http://amix.dk/blog/post/19501</a></span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;</span>  <span class="PreProc">Revisions:</span>
<span class="Comment">&quot;     &gt; 3.6: Added lots of stuff (colors, Command-T, Vim 7.3 persistent undo etc.)</span>
<span class="Comment">&quot;     &gt; 3.5: Paste mode is now shown in status line  if you are in paste mode</span>
<span class="Comment">&quot;     &gt; 3.4: Added mru.vim</span>
<span class="Comment">&quot;     &gt; 3.3: Added syntax highlighting for Mako mako.vim </span>
<span class="Comment">&quot;     &gt; 3.2: Turned on python_highlight_all for better syntax</span>
<span class="Comment">&quot;            highlighting for Python</span>
<span class="Comment">&quot;     &gt; 3.1: Added revisions ;) and bufexplorer.vim</span>
<span class="Comment">&quot;</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; General</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Sets how many lines of history VIM has to remember</span>
<span class="Statement">set</span> <span class="PreProc">history</span>=700

<span class="Comment">&quot; Enable filetype plugin</span>
<span class="Statement">filetype</span> <span class="Type">plugin</span> <span class="Type">on</span>
<span class="Statement">filetype</span> <span class="Type">indent</span> <span class="Type">on</span>

<span class="Comment">&quot; Set to auto read when a file is changed from the outside</span>
<span class="Statement">set</span> <span class="PreProc">autoread</span>

<span class="Comment">&quot; With a map leader it's possible to do extra key combinations</span>
<span class="Comment">&quot; like &lt;leader&gt;w saves the current file</span>
<span class="Statement">let</span> mapleader <span class="Statement">=</span> <span class="Constant">&quot;,&quot;</span>
<span class="Statement">let</span> g:mapleader <span class="Statement">=</span> <span class="Constant">&quot;,&quot;</span>

<span class="Comment">&quot; Fast saving</span>
<span class="Statement">nmap</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>w :w!<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Fast editing of the .vimrc</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>e :e! ~/.vim_runtime/vimrc<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; When vimrc is edited, reload it</span>
<span class="Statement">autocmd</span>! <span class="Type">bufwritepost</span> vimrc <span class="Statement">source</span> ~/<span class="Statement">.</span>vim_runtime/vimrc


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; VIM user interface</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Set 7 lines to the curors - when moving vertical..</span>
<span class="Statement">set</span> <span class="PreProc">so</span>=7

<span class="Statement">set</span> <span class="PreProc">wildmenu</span> <span class="Comment">&quot;Turn on WiLd menu</span>

<span class="Statement">set</span> <span class="PreProc">ruler</span> <span class="Comment">&quot;Always show current position</span>

<span class="Statement">set</span> <span class="PreProc">cmdheight</span>=2 <span class="Comment">&quot;The commandbar height</span>

<span class="Statement">set</span> <span class="PreProc">hid</span> <span class="Comment">&quot;Change buffer - without saving</span>

<span class="Comment">&quot; Set backspace config</span>
<span class="Statement">set</span> <span class="PreProc">backspace</span>=eol<span class="Statement">,</span>start<span class="Statement">,</span>indent
<span class="Statement">set</span> <span class="PreProc">whichwrap</span>+=<span class="Special">&lt;</span><span class="Special">,</span><span class="Special">&gt;</span><span class="Statement">,</span>h<span class="Statement">,</span>l

<span class="Statement">set</span> <span class="PreProc">ignorecase</span> <span class="Comment">&quot;Ignore case when searching</span>
<span class="Statement">set</span> <span class="PreProc">smartcase</span>

<span class="Statement">set</span> <span class="PreProc">hlsearch</span> <span class="Comment">&quot;Highlight search things</span>

<span class="Statement">set</span> <span class="PreProc">incsearch</span> <span class="Comment">&quot;Make search act like search in modern browsers</span>
<span class="Statement">set</span> <span class="PreProc">nolazyredraw</span> <span class="Comment">&quot;Don't redraw while executing macros </span>

<span class="Statement">set</span> <span class="PreProc">magic</span> <span class="Comment">&quot;Set magic on, for regular expressions</span>

<span class="Statement">set</span> <span class="PreProc">showmatch</span> <span class="Comment">&quot;Show matching bracets when text indicator is over them</span>
<span class="Statement">set</span> <span class="PreProc">mat</span>=2 <span class="Comment">&quot;How many tenths of a second to blink</span>

<span class="Comment">&quot; No sound on errors</span>
<span class="Statement">set</span> <span class="PreProc">noerrorbells</span>
<span class="Statement">set</span> <span class="PreProc">novisualbell</span>
<span class="Statement">set</span> <span class="PreProc">t_vb</span>=
<span class="Statement">set</span> <span class="PreProc">tm</span>=500


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Colors and Fonts</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">syntax</span> <span class="Type">enable</span> <span class="Comment">&quot;Enable syntax hl</span>

<span class="Comment">&quot; Set font according to system</span>
<span class="Statement">if</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;mac&quot;</span>
  <span class="Statement">set</span> <span class="PreProc">gfn</span>=Menlo<span class="Statement">:</span>h14
  <span class="Statement">set</span> <span class="PreProc">shell</span>=/bin/bash
<span class="Statement">elseif</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;windows&quot;</span>
  <span class="Statement">set</span> <span class="PreProc">gfn</span>=Bitstream\ Vera\ Sans\ Mono<span class="Statement">:</span>h10
<span class="Statement">elseif</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;linux&quot;</span>
  <span class="Statement">set</span> <span class="PreProc">gfn</span>=Monospace\ 10
  <span class="Statement">set</span> <span class="PreProc">shell</span>=/bin/bash
<span class="Statement">endif</span>

<span class="Statement">if</span> <span class="Identifier">has</span><span class="Special">(</span><span class="Constant">&quot;gui_running&quot;</span><span class="Special">)</span>
  <span class="Statement">set</span> <span class="PreProc">guioptions</span>-=T
  <span class="Statement">set</span> <span class="PreProc">t_Co</span>=256
  <span class="Statement">set</span> <span class="PreProc">background</span>=dark
  <span class="Statement">colorscheme</span> peaksea
  <span class="Statement">set</span> <span class="PreProc">nonu</span>
<span class="Statement">else</span>
  <span class="Statement">colorscheme</span> zellner
  <span class="Statement">set</span> <span class="PreProc">background</span>=dark

  <span class="Statement">set</span> <span class="PreProc">nonu</span>
<span class="Statement">endif</span>

<span class="Statement">set</span> <span class="PreProc">encoding</span>=utf8
<span class="Statement">try</span>
    <span class="Statement">lang</span> en_US
<span class="Statement">catch</span>
<span class="Statement">endtry</span>

<span class="Statement">set</span> <span class="PreProc">ffs</span>=unix<span class="Statement">,</span>dos<span class="Statement">,</span>mac <span class="Comment">&quot;Default file types</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Files, backups and undo</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Turn backup off, since most stuff is in SVN, git anyway...</span>
<span class="Statement">set</span> <span class="PreProc">nobackup</span>
<span class="Statement">set</span> <span class="PreProc">nowb</span>
<span class="Statement">set</span> <span class="PreProc">noswapfile</span>

<span class="Comment">&quot;Persistent undo</span>
<span class="Statement">try</span>
    <span class="Statement">if</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;windows&quot;</span>
      <span class="Statement">set</span> <span class="PreProc">undodir</span>=C<span class="Statement">:</span>\Windows\Temp
    <span class="Statement">else</span>
      <span class="Statement">set</span> <span class="PreProc">undodir</span>=~/.vim_runtime/undodir
    <span class="Statement">endif</span>

    <span class="Statement">set</span> <span class="PreProc">undofile</span>
<span class="Statement">catch</span>
<span class="Statement">endtry</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Text, tab and indent related</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">set</span> <span class="PreProc">expandtab</span>
<span class="Statement">set</span> <span class="PreProc">shiftwidth</span>=4
<span class="Statement">set</span> <span class="PreProc">tabstop</span>=4
<span class="Statement">set</span> <span class="PreProc">smarttab</span>

<span class="Statement">set</span> <span class="PreProc">lbr</span>
<span class="Statement">set</span> <span class="PreProc">tw</span>=500

<span class="Statement">set</span> <span class="PreProc">ai</span> <span class="Comment">&quot;Auto indent</span>
<span class="Statement">set</span> <span class="PreProc">si</span> <span class="Comment">&quot;Smart indet</span>
<span class="Statement">set</span> <span class="PreProc">wrap</span> <span class="Comment">&quot;Wrap lines</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Visual mode related</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Really useful!</span>
<span class="Comment">&quot;  In visual mode when you press * or # to search for the current selection</span>
<span class="Statement">vnoremap</span> <span class="Special">&lt;</span><span class="Special">silent</span><span class="Special">&gt;</span> * :call VisualSearch('f')<span class="Special">&lt;</span><span class="Special">CR</span><span class="Special">&gt;</span>
<span class="Statement">vnoremap</span> <span class="Special">&lt;</span><span class="Special">silent</span><span class="Special">&gt;</span> # :call VisualSearch('b')<span class="Special">&lt;</span><span class="Special">CR</span><span class="Special">&gt;</span>

<span class="Comment">&quot; When you press gv you vimgrep after the selected text</span>
<span class="Statement">vnoremap</span> <span class="Special">&lt;</span><span class="Special">silent</span><span class="Special">&gt;</span> gv :call VisualSearch('gv')<span class="Special">&lt;</span><span class="Special">CR</span><span class="Special">&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>g :vimgrep // **/*.<span class="Special">&lt;</span><span class="Special">left</span><span class="Special">&gt;&lt;</span><span class="Special">left</span><span class="Special">&gt;&lt;</span><span class="Special">left</span><span class="Special">&gt;&lt;</span><span class="Special">left</span><span class="Special">&gt;&lt;</span><span class="Special">left</span><span class="Special">&gt;&lt;</span><span class="Special">left</span><span class="Special">&gt;&lt;</span><span class="Special">left</span><span class="Special">&gt;</span>


<span class="Statement">function</span>! CmdLine<span class="Special">(</span>str<span class="Special">)</span>
    <span class="Statement">exe</span> <span class="Constant">&quot;menu Foo.Bar :&quot;</span> <span class="Statement">.</span> <span class="Identifier">a:str</span>
    <span class="Statement">emenu</span> Foo<span class="Statement">.</span>Bar
    <span class="Statement">unmenu</span> Foo
<span class="Statement">endfunction</span>

<span class="Comment">&quot; From an idea by Michael Naumann</span>
<span class="Statement">function</span>! VisualSearch<span class="Special">(</span>direction<span class="Special">)</span> range
    <span class="Statement">let</span> l:saved_reg <span class="Statement">=</span> <span class="LineNr">@&quot;</span>
    <span class="Statement">execute</span> <span class="Constant">&quot;normal! vgvy&quot;</span>

    <span class="Statement">let</span> l:pattern <span class="Statement">=</span> <span class="Identifier">escape</span><span class="Special">(</span><span class="LineNr">@&quot;</span>, <span class="Constant">'\\/.*$^~[]'</span><span class="Special">)</span>
    <span class="Statement">let</span> l:pattern <span class="Statement">=</span> <span class="Identifier">substitute</span><span class="Special">(</span>l:pattern, <span class="Constant">&quot;\n$&quot;</span>, <span class="Constant">&quot;&quot;</span>, <span class="Constant">&quot;&quot;</span><span class="Special">)</span>

    <span class="Statement">if</span> <span class="Identifier">a:direction</span> <span class="Statement">==</span> <span class="Constant">'b'</span>
        <span class="Statement">execute</span> <span class="Constant">&quot;normal ?&quot;</span> <span class="Statement">.</span> l:pattern <span class="Statement">.</span> <span class="Constant">&quot;^M&quot;</span>
    <span class="Statement">elseif</span> <span class="Identifier">a:direction</span> <span class="Statement">==</span> <span class="Constant">'gv'</span>
        <span class="Statement">call</span> <span class="Normal">CmdLine</span><span class="Special">(</span><span class="Constant">&quot;vimgrep &quot;</span> <span class="Statement">.</span> <span class="Constant">'/'</span><span class="Statement">.</span> l:pattern <span class="Statement">.</span> <span class="Constant">'/'</span> <span class="Statement">.</span> <span class="Constant">' **/*.'</span><span class="Special">)</span>
    <span class="Statement">elseif</span> <span class="Identifier">a:direction</span> <span class="Statement">==</span> <span class="Constant">'f'</span>
        <span class="Statement">execute</span> <span class="Constant">&quot;normal /&quot;</span> <span class="Statement">.</span> l:pattern <span class="Statement">.</span> <span class="Constant">&quot;^M&quot;</span>
    <span class="Statement">endif</span>

    <span class="Statement">let</span> @/ <span class="Statement">=</span> l:pattern
    <span class="Statement">let</span> <span class="LineNr">@&quot;</span> <span class="Statement">=</span> l:saved_reg
<span class="Statement">endfunction</span>



<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Command mode related</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Smart mappings on the command line</span>
<span class="Statement">cno</span> $h e ~/
<span class="Statement">cno</span> $d e ~/Desktop/
<span class="Statement">cno</span> $j e ./
<span class="Statement">cno</span> $c e <span class="Special">&lt;</span><span class="Special">C-</span><span class="Special">\&gt;</span>eCurrentFileDir(&quot;e&quot;)<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; $q is super useful when browsing on the command line</span>
<span class="Statement">cno</span> $q <span class="Special">&lt;</span><span class="Special">C-</span><span class="Special">\&gt;</span>eDeleteTillSlash()<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Bash like keys for the command line</span>
<span class="Statement">cnoremap</span> <span class="Special">&lt;</span><span class="Special">C-A</span><span class="Special">&gt;</span>      <span class="Special">&lt;</span><span class="Special">Home</span><span class="Special">&gt;</span>
<span class="Statement">cnoremap</span> <span class="Special">&lt;</span><span class="Special">C-E</span><span class="Special">&gt;</span>      <span class="Special">&lt;</span><span class="Special">End</span><span class="Special">&gt;</span>
<span class="Statement">cnoremap</span> <span class="Special">&lt;</span><span class="Special">C-K</span><span class="Special">&gt;</span>      <span class="Special">&lt;</span><span class="Special">C-U</span><span class="Special">&gt;</span>

<span class="Statement">cnoremap</span> <span class="Special">&lt;</span><span class="Special">C-P</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">Up</span><span class="Special">&gt;</span>
<span class="Statement">cnoremap</span> <span class="Special">&lt;</span><span class="Special">C-N</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">Down</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Useful on some European keyboards</span>
<span class="Statement">map</span> ½ $
<span class="Statement">imap</span> ½ $
<span class="Statement">vmap</span> ½ $
<span class="Statement">cmap</span> ½ $


<span class="Statement">func</span>! Cwd<span class="Special">()</span>
  <span class="Statement">let</span> cwd <span class="Statement">=</span> <span class="Identifier">getcwd</span><span class="Special">()</span>
  <span class="Statement">return</span> <span class="LineNr">&quot;e</span> <span class="Comment">&quot; . cwd </span>
<span class="Statement">endfunc</span>

<span class="Statement">func</span>! DeleteTillSlash<span class="Special">()</span>
  <span class="Statement">let</span> g:cmd <span class="Statement">=</span> <span class="Identifier">getcmdline</span><span class="Special">()</span>
  <span class="Statement">if</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;linux&quot;</span> <span class="Statement">||</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;mac&quot;</span>
    <span class="Statement">let</span> g:cmd_edited <span class="Statement">=</span> <span class="Identifier">substitute</span><span class="Special">(</span>g:cmd, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">(.*\[/\]</span><span class="Constant">\\</span><span class="Constant">).*&quot;</span>, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">1&quot;</span>, <span class="Constant">&quot;&quot;</span><span class="Special">)</span>
  <span class="Statement">else</span>
    <span class="Statement">let</span> g:cmd_edited <span class="Statement">=</span> <span class="Identifier">substitute</span><span class="Special">(</span>g:cmd, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">(.*\[</span><span class="Constant">\\\\</span><span class="Constant">]</span><span class="Constant">\\</span><span class="Constant">).*&quot;</span>, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">1&quot;</span>, <span class="Constant">&quot;&quot;</span><span class="Special">)</span>
  <span class="Statement">endif</span>
  <span class="Statement">if</span> g:cmd <span class="Statement">==</span> g:cmd_edited
    <span class="Statement">if</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;linux&quot;</span> <span class="Statement">||</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;mac&quot;</span>
      <span class="Statement">let</span> g:cmd_edited <span class="Statement">=</span> <span class="Identifier">substitute</span><span class="Special">(</span>g:cmd, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">(.*\[/\]</span><span class="Constant">\\</span><span class="Constant">).*/&quot;</span>, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">1&quot;</span>, <span class="Constant">&quot;&quot;</span><span class="Special">)</span>
    <span class="Statement">else</span>
      <span class="Statement">let</span> g:cmd_edited <span class="Statement">=</span> <span class="Identifier">substitute</span><span class="Special">(</span>g:cmd, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">(.*\[</span><span class="Constant">\\\\</span><span class="Constant">\]</span><span class="Constant">\\</span><span class="Constant">).*\[</span><span class="Constant">\\\\</span><span class="Constant">\]&quot;</span>, <span class="Constant">&quot;</span><span class="Constant">\\</span><span class="Constant">1&quot;</span>, <span class="Constant">&quot;&quot;</span><span class="Special">)</span>
    <span class="Statement">endif</span>
  <span class="Statement">endif</span>
  <span class="Statement">return</span> g:cmd_edited
<span class="Statement">endfunc</span>

<span class="Statement">func</span>! CurrentFileDir<span class="Special">(</span>cmd<span class="Special">)</span>
  <span class="Statement">return</span> <span class="Identifier">a:cmd</span> <span class="Statement">.</span> <span class="Constant">&quot; &quot;</span> <span class="Statement">.</span> <span class="Identifier">expand</span><span class="Special">(</span><span class="Constant">&quot;%:p:h&quot;</span><span class="Special">)</span> <span class="Statement">.</span> <span class="Constant">&quot;/&quot;</span>
<span class="Statement">endfunc</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Moving around, tabs and buffers</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Map space to / (search) and c-space to ? (backgwards search)</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">space</span><span class="Special">&gt;</span> /
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">c-space</span><span class="Special">&gt;</span> ?
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">silent</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span><span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span> :noh<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Smart way to move btw. windows</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">C-j</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">C-W</span><span class="Special">&gt;</span>j
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">C-k</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">C-W</span><span class="Special">&gt;</span>k
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">C-h</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">C-W</span><span class="Special">&gt;</span>h
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">C-l</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">C-W</span><span class="Special">&gt;</span>l

<span class="Comment">&quot; Close the current buffer</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>bd :Bclose<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Close all the buffers</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>ba :1,300 bd!<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Use the arrows to something usefull</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">right</span><span class="Special">&gt;</span> :bn<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">left</span><span class="Special">&gt;</span> :bp<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Tab configuration</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>tn :tabnew<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>te :tabedit
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>tc :tabclose<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>tm :tabmove

<span class="Comment">&quot; When pressing &lt;leader&gt;cd switch to the directory of the open buffer</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>cd :cd %:p:h<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>


<span class="Statement">command</span>! Bclose <span class="Identifier">call</span> <span class="Special">&lt;</span><span class="Special">SID</span><span class="Special">&gt;</span><span class="Normal">BufcloseCloseIt</span>()
<span class="Statement">function</span>! <span class="Special">&lt;SID&gt;</span>BufcloseCloseIt<span class="Special">()</span>
   <span class="Statement">let</span> l:currentBufNum <span class="Statement">=</span> <span class="Identifier">bufnr</span><span class="Special">(</span><span class="Constant">&quot;%&quot;</span><span class="Special">)</span>
   <span class="Statement">let</span> l:alternateBufNum <span class="Statement">=</span> <span class="Identifier">bufnr</span><span class="Special">(</span><span class="Constant">&quot;#&quot;</span><span class="Special">)</span>

   <span class="Statement">if</span> <span class="Identifier">buflisted</span><span class="Special">(</span>l:alternateBufNum<span class="Special">)</span>
     <span class="Statement">buffer</span> #
   <span class="Statement">else</span>
     <span class="Statement">bnext</span>
   <span class="Statement">endif</span>

   <span class="Statement">if</span> <span class="Identifier">bufnr</span><span class="Special">(</span><span class="Constant">&quot;%&quot;</span><span class="Special">)</span> <span class="Statement">==</span> l:currentBufNum
     <span class="Statement">new</span>
   <span class="Statement">endif</span>

   <span class="Statement">if</span> <span class="Identifier">buflisted</span><span class="Special">(</span>l:currentBufNum<span class="Special">)</span>
     <span class="Normal">execute</span><span class="Special">(</span><span class="Constant">&quot;bdelete! &quot;</span><span class="Statement">.</span>l:currentBufNum<span class="Special">)</span>
   <span class="Statement">endif</span>
<span class="Statement">endfunction</span>

<span class="Comment">&quot; Specify the behavior when switching between buffers </span>
<span class="Statement">try</span>
  <span class="Statement">set</span> <span class="PreProc">switchbuf</span>=usetab
  <span class="Statement">set</span> <span class="PreProc">stal</span>=2
<span class="Statement">catch</span>
<span class="Statement">endtry</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Statusline</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Always hide the statusline</span>
<span class="Statement">set</span> <span class="PreProc">laststatus</span>=2

<span class="Comment">&quot; Format the statusline</span>
<span class="Statement">set</span> <span class="PreProc">statusline</span>=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD<span class="Statement">:</span>\ %r%{CurDir()}%h\ \ \ Line<span class="Statement">:</span>\ %l/%L<span class="Statement">:</span>%c


<span class="Statement">function</span>! CurDir<span class="Special">()</span>
    <span class="Statement">let</span> curdir <span class="Statement">=</span> <span class="Identifier">substitute</span><span class="Special">(</span><span class="Identifier">getcwd</span><span class="Special">()</span>, <span class="Constant">'/Users/amir/'</span>, <span class="Constant">&quot;~/&quot;</span>, <span class="Constant">&quot;g&quot;</span><span class="Special">)</span>
    <span class="Statement">return</span> curdir
<span class="Statement">endfunction</span>

<span class="Statement">function</span>! HasPaste<span class="Special">()</span>
    <span class="Statement">if</span> &amp;paste
        <span class="Statement">return</span> <span class="Constant">'PASTE MODE  '</span>
    <span class="Statement">else</span>
        <span class="Statement">return</span> <span class="Constant">''</span>
    <span class="Statement">endif</span>
<span class="Statement">endfunction</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Parenthesis/bracket expanding</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">vnoremap</span> $1 <span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&gt;a)<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&lt;i(<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>
<span class="Statement">vnoremap</span> $2 <span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&gt;a]<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&lt;i[<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>
<span class="Statement">vnoremap</span> $3 <span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&gt;a}<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&lt;i{<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>
<span class="Statement">vnoremap</span> $$ <span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&gt;a&quot;<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&lt;i&quot;<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>
<span class="Statement">vnoremap</span> $q <span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&gt;a'<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&lt;i'<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>
<span class="Statement">vnoremap</span> $e <span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&gt;a&quot;<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>`&lt;i&quot;<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>

<span class="Comment">&quot; Map auto complete of (, &quot;, ', [</span>
<span class="Statement">inoremap</span> $1 ()<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>i
<span class="Statement">inoremap</span> $2 []<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>i
<span class="Statement">inoremap</span> $3 {}<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>i
<span class="Statement">inoremap</span> $4 {<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>o}<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>O
<span class="Statement">inoremap</span> $q ''<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>i
<span class="Statement">inoremap</span> $e &quot;&quot;<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>i
<span class="Statement">inoremap</span> $t <span class="Special">&lt;&gt;&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>i


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; General Abbrevs</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">iab</span> xdate <span class="Special">&lt;</span><span class="Special">c-r</span><span class="Special">&gt;</span>=strftime(&quot;%d/%m/%y %H:%M:%S&quot;)<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Editing mappings</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot;Remap VIM 0</span>
<span class="Statement">map</span> 0 ^

<span class="Comment">&quot;Move a line of text using ALT+[jk] or Comamnd+[jk] on mac</span>
<span class="Statement">nmap</span> <span class="Special">&lt;</span><span class="Special">M-j</span><span class="Special">&gt;</span> mz:m+<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>`z
<span class="Statement">nmap</span> <span class="Special">&lt;</span><span class="Special">M-k</span><span class="Special">&gt;</span> mz:m-2<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>`z
<span class="Statement">vmap</span> <span class="Special">&lt;</span><span class="Special">M-j</span><span class="Special">&gt;</span> :m'&gt;+<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>`&lt;my`&gt;mzgv`yo`z
<span class="Statement">vmap</span> <span class="Special">&lt;</span><span class="Special">M-k</span><span class="Special">&gt;</span> :m'&lt;-2<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>`&gt;my`&lt;mzgv`yo`z

<span class="Statement">if</span> <span class="Normal">MySys</span><span class="Special">()</span> <span class="Statement">==</span> <span class="Constant">&quot;mac&quot;</span>
  <span class="Statement">nmap</span> <span class="Special">&lt;</span><span class="Special">D-j</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">M-j</span><span class="Special">&gt;</span>
  <span class="Statement">nmap</span> <span class="Special">&lt;</span><span class="Special">D-k</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">M-k</span><span class="Special">&gt;</span>
  <span class="Statement">vmap</span> <span class="Special">&lt;</span><span class="Special">D-j</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">M-j</span><span class="Special">&gt;</span>
  <span class="Statement">vmap</span> <span class="Special">&lt;</span><span class="Special">D-k</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">M-k</span><span class="Special">&gt;</span>
<span class="Statement">endif</span>

<span class="Comment">&quot;Delete trailing white space, useful for Python ;)</span>
<span class="Statement">func</span>! DeleteTrailingWS<span class="Special">()</span>
  <span class="Statement">exe</span> <span class="Constant">&quot;normal mz&quot;</span>
  <span class="Number">%</span><span class="Statement">s</span><span class="Special">/</span>\s\+$<span class="Special">//</span><span class="Special">ge</span>
  <span class="Statement">exe</span> <span class="Constant">&quot;normal `z&quot;</span>
<span class="Statement">endfunc</span>
<span class="Statement">autocmd</span> <span class="Type">BufWrite</span> *.py :<span class="Statement">call</span> <span class="Normal">DeleteTrailingWS</span><span class="Special">()</span>

<span class="Statement">set</span> <span class="PreProc">guitablabel</span>=%t


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Cope</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Do :help cope if you are unsure what cope is. It's super useful!</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>cc :botright cope<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>n :cn<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>p :cp<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; bufExplorer plugin</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">let</span> g:bufExplorerDefaultHelp<span class="Statement">=</span><span class="Number">0</span>
<span class="Statement">let</span> g:bufExplorerShowRelativePath<span class="Statement">=</span><span class="Number">1</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>o :BufExplorer<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Minibuffer plugin</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">let</span> g:miniBufExplModSelTarget <span class="Statement">=</span> <span class="Number">1</span>
<span class="Statement">let</span> g:miniBufExplorerMoreThanOne <span class="Statement">=</span> <span class="Number">2</span>
<span class="Statement">let</span> g:miniBufExplModSelTarget <span class="Statement">=</span> <span class="Number">0</span>
<span class="Statement">let</span> g:miniBufExplUseSingleClick <span class="Statement">=</span> <span class="Number">1</span>
<span class="Statement">let</span> g:miniBufExplMapWindowNavVim <span class="Statement">=</span> <span class="Number">1</span>
<span class="Statement">let</span> g:miniBufExplVSplit <span class="Statement">=</span> <span class="Number">25</span>
<span class="Statement">let</span> g:miniBufExplSplitBelow<span class="Statement">=</span><span class="Number">1</span>

<span class="Statement">let</span> g:bufExplorerSortBy <span class="Statement">=</span> <span class="Constant">&quot;name&quot;</span>

<span class="Statement">autocmd</span> <span class="Type">BufRead</span>,<span class="Type">BufNew</span> :call UMiniBufExplorer

<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>u :TMiniBufExplorer<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Omni complete functions</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">autocmd</span> <span class="Type">FileType</span> css <span class="Statement">set</span> <span class="PreProc">omnifunc</span>=csscomplete#CompleteCSS


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Spell checking</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot;Pressing ,ss will toggle and untoggle spell checking</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>ss :setlocal spell!<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Comment">&quot;Shortcuts using &lt;leader&gt;</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>sn ]s
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>sp [s
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>sa zg
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>s? z=


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Python section</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">let</span> python_highlight_all <span class="Statement">=</span> <span class="Number">1</span>
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">syn</span> <span class="Type">keyword</span> pythonDecorator True None False self

<span class="Statement">au</span> <span class="Type">BufNewFile</span>,<span class="Type">BufRead</span> *.jinja <span class="Statement">set</span> <span class="PreProc">syntax</span>=htmljinja
<span class="Statement">au</span> <span class="Type">BufNewFile</span>,<span class="Type">BufRead</span> *.mako <span class="Statement">set</span> <span class="PreProc">ft</span>=mako

<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">inoremap</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> $r return
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">inoremap</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> $i import
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">inoremap</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> $p print
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">inoremap</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> $f #--- PH ----------------------------------------------<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>FP2xi
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>1 /class
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>2 /def
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>C ?class
<span class="Statement">au</span> <span class="Type">FileType</span> python <span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>D ?def


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; JavaScript section</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">call</span> <span class="Normal">JavaScriptFold</span><span class="Special">()</span>
<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">setl</span> <span class="PreProc">fen</span>
<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">setl</span> <span class="PreProc">nocindent</span>

<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">imap</span> <span class="Special">&lt;</span><span class="Special">c-t</span><span class="Special">&gt;</span> AJS.log();<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>hi
<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">imap</span> <span class="Special">&lt;</span><span class="Special">c-a</span><span class="Special">&gt;</span> alert();<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>hi

<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">inoremap</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> $r return
<span class="Statement">au</span> <span class="Type">FileType</span> javascript <span class="Statement">inoremap</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> $f //--- PH ----------------------------------------------<span class="Special">&lt;</span><span class="Special">esc</span><span class="Special">&gt;</span>FP2xi

<span class="Statement">function</span>! JavaScriptFold<span class="Special">()</span>
    <span class="Statement">setl</span> <span class="PreProc">foldmethod</span>=syntax
    <span class="Statement">setl</span> <span class="PreProc">foldlevelstart</span>=1
    syn region foldBraces <span class="Statement">start</span><span class="Statement">=</span>/<span class="Special">{</span>/ end<span class="Statement">=</span>/<span class="Special">}</span>/ transparent <span class="Statement">fold</span> keepend extend

    <span class="Statement">function</span>! FoldText<span class="Special">()</span>
    <span class="Statement">return</span> <span class="Identifier">substitute</span><span class="Special">(</span><span class="Identifier">getline</span><span class="Special">(</span>v:foldstart<span class="Special">)</span>, <span class="Constant">'{.*'</span>, <span class="Constant">'{...}'</span>, <span class="Constant">''</span><span class="Special">)</span>
    <span class="Statement">endfunction</span>
    <span class="Statement">setl</span> <span class="PreProc">foldtext</span>=FoldText()
<span class="Statement">endfunction</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; MRU plugin</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">let</span> MRU_Max_Entries <span class="Statement">=</span> <span class="Number">400</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>f :MRU<span class="Special">&lt;</span><span class="Special">CR</span><span class="Special">&gt;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Command-T</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">let</span> g:CommandTMaxHeight <span class="Statement">=</span> <span class="Number">15</span>
<span class="Statement">set</span> <span class="PreProc">wildignore</span>+=*.o<span class="Statement">,</span>*.obj<span class="Statement">,</span>.git<span class="Statement">,</span>*.pyc
<span class="Statement">noremap</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>j :CommandT<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">noremap</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>y :CommandTFlush<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>


<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; Vim grep</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Statement">let</span> Grep_Skip_Dirs <span class="Statement">=</span> <span class="Constant">'RCS CVS SCCS .svn generated'</span>
<span class="Statement">set</span> <span class="PreProc">grepprg</span>=/bin/grep\ -nH



<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; =&gt; MISC</span>
<span class="Comment">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
<span class="Comment">&quot; Remove the Windows ^M - when the encodings gets messed up</span>
<span class="Statement">noremap</span> <span class="Special">&lt;</span><span class="Special">Leader</span><span class="Special">&gt;</span>m mmHmt:%s/<span class="Special">&lt;</span><span class="Special">C-V</span><span class="Special">&gt;&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>//ge<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>'tzt'm

<span class="Comment">&quot;Quickly open a buffer for scripbble</span>
<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>q :e ~/buffer<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
<span class="Statement">au</span> <span class="Type">BufRead</span>,<span class="Type">BufNewFile</span> ~/buffer <span class="Statement">iab</span> <span class="Special">&lt;</span><span class="Special">buffer</span><span class="Special">&gt;</span> xh1 ===========================================

<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>pp :setlocal paste!<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>

<span class="Statement">map</span> <span class="Special">&lt;</span><span class="Special">leader</span><span class="Special">&gt;</span>bb :cd ..<span class="Special">&lt;</span><span class="Special">cr</span><span class="Special">&gt;</span>
</pre>
</body>
</html>
